package com.studyv3.test.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.studyv3.common.annotation.Excel;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;


/**
 * study_book
 */

@Data
public class StudyBookBo {

    /**
     *
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "不能为空")
    private Long id;

    /**
     * 书名
     */
    @NotBlank(message = "书名不能为空")
    private String name;

    /**
     * 书的类型
     */
    @NotNull(message = "书的类型不能为空")
    private List<Integer> typesList;

    /**
     * 书的简介
     */
    @NotBlank(message = "书的简介不能为空")
    private String remark;

    /**
     * 书的总体评分
     */
    @NotNull(message = "书的总体评分不能为空")
    private Double score;

    private Boolean isOrderScore;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTimeBegin;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTimeEnd;

}
